﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<VERKProjectHopur16.Models.DepViewModel>" %>
<%@ Import Namespace="VERKProjectHopur16.Helpers" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	AllPapers
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server"> 

    <h2><%: Lang.GetText("Menu", "Papers") %></h2>
    <div class="language">
   	<div class="outer_container"> 
    <div class="inner_container" style="position:relative; width: 150px;">
    
    <%
        var l = Lang.GetFlag(Session["langPaper"]); 
    %>
          <form action=".">
	        <select id="contlangselP" name="custom_markup_example"> 
		    <option title="<div><span class='flagmenuitem <%: l %>'></span> Content language</div>"></option> 
		    <option title="<div><span class='flagmenuitem all'></span> All Content</div>" value="4"></option> 
		    <option title="<div><span class='flagmenuitem is'></span> Iceland</div>" value="2"></option> 
		    <option title="<div><span class='flagmenuitem en'></span> English</div>" value="1"></option> 
	        <option title="<div><span class='flagmenuitem se'></span> Swedish</div>" value="3"></option> 
            </select>
         </form>
    </div>
    </div>
    </div>
    <div id="tabs" class="tabs">
        <ul>
            <li><a href="#fragment-1"><span><%: Lang.GetText("Menu", "All") %></span></a></li>
            <li><a href="#fragment-2"><span><%: Lang.GetText("Menu", "Medicine") %></span></a></li>
            <li><a href="#fragment-3"><span><%: Lang.GetText("Menu", "Psychology")%></span></a></li>
            <li><a href="#fragment-4"><span><%: Lang.GetText("Menu", "Sociology") %></span></a></li>
        </ul>
        <div id="fragment-1">
        <table class="tabcontent">
        <thead>
                <tr>
                        <th><%= Html.ActionLink(Lang.GetText("Menu", "Date"), "orderPapers", new { id = 1 })%></th>
                        <th><%= Html.ActionLink(Lang.GetText("Menu", "Title"), "orderPapers", new { id = 2 })%></th>
                        <th><%= Html.ActionLink(Lang.GetText("Menu", "Author"), "orderPapers", new { id = 3 })%></th>
                        <th><%: Lang.GetText("Menu", "Department") %></th>
                </tr>
            </thead>
            <tbody>
            <% foreach (var item in Model.allDept) 
            { %>
            <tr>
                <td><%: item.InsertDate.ToString("dddd, dd MMMM yyyy")%></td>
                <td><%= Html.ActionLink(item.Title, "SingleContent", new { id = item.ContentID })%></td>
                <td><%: item.Author.Name %></td>
                <td><%: Lang.GetText("Menu", item.Department.Name) %></td>
            </tr>
            <% } %>
            </tbody>
            </table>
        </div>
        <div id="fragment-2">
        <table class="tabcontent">
        <thead>
                <tr>
                        <th><%= Html.ActionLink(Lang.GetText("Menu", "Date"), "orderPapers", new { id = 1 })%></th>
                        <th><%= Html.ActionLink(Lang.GetText("Menu", "Title"), "orderPapers", new { id = 2 })%></th>
                        <th><%= Html.ActionLink(Lang.GetText("Menu", "Author"), "orderPapers", new { id = 3 })%></th>
                </tr>
            </thead>
            <tbody>
            <% foreach (var item in Model.medDept) 
            { %>
            <tr>
                <td><%: item.InsertDate.ToString("dddd, dd MMMM yyyy")%></td>
                <td><%= Html.ActionLink(item.Title, "SingleContent", new { id = item.ContentID })%></td>
                <td><%: item.Author.Name %></td>
            </tr>
            <% } %>
            </tbody>
            </table>
        </div>
        <div id="fragment-3">
        <table class="tabcontent">
        <thead>
                <tr>
                        <th><%= Html.ActionLink(Lang.GetText("Menu", "Date"), "orderPapers", new { id = 1 })%></th>
                        <th><%= Html.ActionLink(Lang.GetText("Menu", "Title"), "orderPapers", new { id = 2 })%></th>
                        <th><%= Html.ActionLink(Lang.GetText("Menu", "Author"), "orderPapers", new { id = 3 })%></th>
                </tr>
            </thead>
            <tbody>
            <% foreach (var item in Model.psiDept) 
            { %>
            <tr>
                <td><%: item.InsertDate.ToString("dddd, dd MMMM yyyy")%></td>
                <td><%= Html.ActionLink(item.Title, "SingleContent", new { id = item.ContentID })%></td>
                <td><%: item.Author.Name %></td>
            </tr>
            <% } %>
            </tbody>
            </table>
        </div>
        <div id="fragment-4">
        <table class="tabcontent">
        <thead>
                <tr>
                        <th><%= Html.ActionLink(Lang.GetText("Menu", "Date"), "orderPapers", new { id = 1 })%></th>
                        <th><%= Html.ActionLink(Lang.GetText("Menu", "Title"), "orderPapers", new { id = 2 })%></th>
                        <th><%= Html.ActionLink(Lang.GetText("Menu", "Author"), "orderPapers", new { id = 3 })%></th>
                </tr>
            </thead>
            <tbody>
            <% foreach (var item in Model.socDept) 
            { %>
             <tr>
                <td><%: item.InsertDate.ToString("dddd, dd MMMM yyyy")%></td>
                <td><%= Html.ActionLink(item.Title, "SingleContent", new { id = item.ContentID })%></td>
                <td><%: item.Author.Name %></td>
            </tr>
            <% } %>
            </tbody>
            </table>
        </div>
    </div> 

</asp:Content>
